<template>
	<el-dialog :title="title" v-bind:visible.sync="visible" :close-on-click-modal="false" :width="width">
		<slot name="content-widget">
			<span>{{ content }}</span>
		</slot>
		<span slot="footer" class="dialog-footer">
			<slot name="footer"></slot>
		</span>
	</el-dialog>
</template>

<script>
export default {
	props: {
		width: {
			type: String
		}
	},
	data() {
		return {
			title: "",
			content: "",
			visible: false
		}
	},
	methods: {
		openDialog(title, content) {
			this.title = title
			this.content = content
			this.visible = true
		},
		closeDialog() {
			this.visible = false
		},		
	}
}
</script>

<style>
</style>
